import 'package:flutter/material.dart';

import '../segment/public_segment.dart';
import 'horizontal_item.dart';

/// FileName segment_item
///
/// @Author lax
/// @Date 2024/6/7
///
/// @Description

class SegmentItem extends HorizontalItem {
  SegmentItem({
    super.key,
    super.title,
    super.titleWidth,
    super.titleStyle,
    super.unableTitleStyle,
    super.leftWidget,
    super.rightWidget,
    int? value,
    List<String> dataSource = const [],
    Function(int index)? onChanged,
  }) : super(
          valueWidget: Row(
            mainAxisAlignment: MainAxisAlignment.end,
            children: [
              PublicSegment(
                value: value,
                dataSource: dataSource,
                onChanged: onChanged,
              ),
            ],
          ),
        );
}
